package cn.com.assistant.mapper;

import cn.com.assistant.entity.AnswerEntity;
import cn.com.assistant.entity.CasAnswerEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CasAnswerMapper extends BaseMapper<CasAnswerEntity> {

    /**
     * 根据关联id查询
     * @param principalId
     * @return
     */
    List<CasAnswerEntity> findByPId(@Param("principalId") String principalId);

    /**
     * 根据关联id查询
     * @param principalId
     * @return
     */
    List<Map<String, Object>> findMapByPId(@Param("principalId") String principalId);

    /**
     * 根据关联id删除数据
     * @param principalIds
     * @return
     */
    int deleteByPId(@Param("principalIds") List<String> principalIds);

    /**
     * 更新记录
     * @param casAnswerEntity
     * @return
     */
    int update(CasAnswerEntity casAnswerEntity);

    /**
     * 更新二级问题回复图片
     * @param casAnswerEntity
     * @return
     */
    int updateImage(CasAnswerEntity casAnswerEntity);

}
 
 
